package com.googlecode.classgrep;

import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.List;

import com.googlecode.classgrep.grep.annotated.client.AnnotationGrepClient;
import com.googlecode.classgrep.grep.annotated.client.ClassGrepClient;
import com.googlecode.classgrep.grep.annotated.client.FieldGrepClient;
import com.googlecode.classgrep.grep.annotated.client.MethodGrepClient;
import com.googlecode.classgrep.info.HierarchyInfo;
import com.googlecode.classgrep.info.InvokeInfo;

public interface GrepRobotClient extends 
ClassGrepClient,
AnnotationGrepClient,
FieldGrepClient,
MethodGrepClient{
    
	
	/**
	 * set classloader
	 * 
	 * @param classLoader
	 */
	void setClassLoader(ClassLoader classLoader);
	
	
	/**
	 * add annotation
	 * 
	 * @param annotation
	 */
	void addAnnotation(Class< ? extends Annotation> annotation);
	
	/*
	 * 
	 * @param esi
	 *//*
	void setExtractSuperInterfaces(boolean esi);
	
	
	*//*
	 * 
	 * @return
	 *//*
	boolean isExtractSuperInterfaces();*/
	
	
	/**
	 * 
	 * @param excludeParent
	 */
	void setExcludeParent(boolean excludeParent);
	
	
	/**
	 * 
	 * @return
	 */
	boolean isExcludeParent();
	
	/**
	 * start robot
	 * 
	 */
	void startup() throws Exception;
	
	
	/**
	 * 
	 * @param classNameFilter
	 */
	void setClassNameFilter(Test<String> classNameFilter);
	
	
	/**
	 * 
	 * add called method
	 * 
	 * @param method
	 */
	void addCalledMethod(Method method);
	
	/**
	 * get all called methods that set by addCalledMethod(Method method).
	 * 
	 * @return
	 */
	public List<Method> getCalledMethods();
	
	/**
	 * 
	 * add called constructor
	 * 
	 * @param constr
	 */
	public void addCalledConstructor(Constructor<?> constr);
	
	/**
	 * 
	 * @return
	 */
	public List<Constructor<?>> getCalledConstructor();
	
	/**
	 * 
	 * @return
	 */
	public List<InvokeInfo> getInvokeInfos(Method method);
	
	
	/**
	 * 
	 * @return
	 */
	public List<InvokeInfo> getInvokeInfos(Constructor<?> constr);
	
	
	/**
	 * 
	 * @param clazz
	 */
	public void addParentClass(Class<?> clazz);
	
	
	/**
	 * 
	 * @param clazz
	 * @return
	 */
	public HierarchyInfo getHierarchyChild(Class<?> clazz);
	
	
	public List<Class<?>> getAllParentClasses();
	
}
